﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Pages_PlaceMain" Codebehind="PlaceMain.aspx.cs" MasterPageFile="~/Pages/Master/MainAdmin.Master"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <fieldset id="pageLoad">
        <div id="fillInData">
            <h1>Locais</h1>
        <asp:GridView ID="gvPlaces" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="odsPlaces" ForeColor="#333333" 
            GridLines="None" onrowcommand="gvPlaces_RowCommand" DataKeyNames="Id" 
                CssClass="table" Font-Size="Medium" AllowPaging="True">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="ID" SortExpression="Id" />
                <asp:BoundField DataField="ZipCode" HeaderText="CEP" 
                    SortExpression="ZipCode" />
                <asp:BoundField DataField="Address" HeaderText="Endereço" 
                    SortExpression="Address" />
                <asp:BoundField DataField="Complement" HeaderText="Complemento" 
                    SortExpression="Complement" />
                <asp:BoundField DataField="Number" HeaderText="Número" 
                    SortExpression="Number" />
                <asp:TemplateField>
                  <ItemTemplate>
                       <asp:LinkButton runat= "server"  ID="lbUpdate" CommandArgument='<%# Bind("Id") %>' CommandName="UpdateData" target="_blank"> <img src="../../Images/Icon/EDITFILE_24x24.png" alt="Editar" /> </asp:LinkButton>
                  </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                  <ItemTemplate>
                    <asp:LinkButton runat= "server"  ID="lbDelete" CommandArgument='<%# Bind("Id") %>' CommandName="ExcludeData" OnClientClick='javascript:return confirm("Confirma a exclusão deste local?")' > <img src="../../Images/Icon/EXCLUDEFILE_24x24.png" alt="Excluir" /> </asp:LinkButton>
                  </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>    
        <asp:ObjectDataSource ID="odsPlaces" runat="server" SelectMethod="GetPlaces" 
            TypeName="br.com.SistemaChamados.Controller.PlaceController">
        </asp:ObjectDataSource>
        </div>
        </fieldset>
</asp:Content>